package org.zzz.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.zzz.entity.Role;

import java.util.List;

/**
 * @Author ZZF
 * @Time 2021/04/19 15:12
 */
public interface RoleMapper {
    /**
     * 根据角色id获取角色名称
     * @param id
     * @return
     */
    @Select("select name from role where id = #{id}")
    String getRoleNameById(@Param("id") String id);

    /**
     * 获取角色
     * @return
     */
    @Select("select * from role")
    List<Role> listRole();

}